package com.sc.VenusQueryBeta.api.account;

import com.hengjun.kingstar.sdk.helper.okhttp.ResponseFormat;
import com.sc.VenusQueryBeta.model.bean.account.AccountList;
import com.sc.VenusQueryBeta.model.bean.account.AllRoomListBean;
import com.sc.VenusQueryBeta.model.bean.account.CunDanBean;
import com.sc.VenusQueryBeta.model.bean.account.CurrencyBean;
import com.sc.VenusQueryBeta.model.bean.account.CurrencyListBean;
import com.sc.VenusQueryBeta.model.bean.account.DaiShuBean;
import com.sc.VenusQueryBeta.model.bean.account.DistanceloginBean;
import com.sc.VenusQueryBeta.model.bean.account.List;
import com.sc.VenusQueryBeta.model.bean.account.MaxChangemonthBean;
import com.sc.VenusQueryBeta.model.bean.account.changmian.ChangMianPopBean;
import com.sc.VenusQueryBeta.model.bean.account.changmian.ChangmianBean;
import com.sc.VenusQueryBeta.model.bean.account.cunka.CunKaList1;
import com.sc.VenusQueryBeta.model.bean.account.cunka.CunKaList2;
import com.sc.VenusQueryBeta.model.bean.account.daikuan.DaiKuanBean01;
import com.sc.VenusQueryBeta.model.bean.account.daikuan.DaiKuanBean02;
import com.sc.VenusQueryBeta.model.bean.account.jintie.CommissionBean;
import com.sc.VenusQueryBeta.model.bean.account.jintie.JTBBean;
import com.sc.VenusQueryBeta.model.bean.account.jintie.JinTieBean;
import com.sc.VenusQueryBeta.model.bean.account.jintie.TemaBean;
import com.sc.VenusQueryBeta.model.bean.account.msg.MsgListBean;
import com.sc.VenusQueryBeta.model.bean.account.xiadaikuan.XiaDaiKuan01Bean;
import com.sc.VenusQueryBeta.model.bean.account.xiaofei.XiaoFei01Bean;
import com.sc.VenusQueryBeta.model.bean.account.xiaofei.XiaoFei02Bean;
import com.sc.VenusQueryBeta.model.bean.account.zhuanma.ZhuanMaList1;
import com.sc.VenusQueryBeta.model.bean.account.zhuanma.ZhuanMaList2;


import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Streaming;

/**
 * Created by Administrator on 12/10/2018.
 *
 */

public interface AccountApi {

    //查詢戶口列表
    @FormUrlEncoded
    @POST("httpUserMessage/SmsClient-queryExistClient.action")
    @ResponseFormat("xml")
    Observable<List> queryRegist(@Field("clientAppmsgnum") String clientAppmsgnum);

    //查询是否有登录的户口密码
    @FormUrlEncoded
    @POST("httpUserMessage/SmsClient-queryClientSmsQueryPassword.action")
    @ResponseFormat("json")
    Observable<String> queryRegistPassword(@Field("clientindex") int clientindex, @Field("serverSettingIndex") String serverSettingIndex);

    //户口第一次登录生成验证吗
    @FormUrlEncoded
    @POST("httpUserMessage/SmsClient-createVerificaCode.action")
    @ResponseFormat("json")
    Observable<String> sendcode(@Field("clientindex") int clientindex);

    //设置戶口密碼密码
    @FormUrlEncoded
    @POST("httpUserMessage/SmsClient-resetClientSmsQueryPassword.action")
    @ResponseFormat("json")
    Observable<String>  sethukoupwd(@Field("clientindex")int clientindex,@Field("verificaCode")String verificaCode,@Field("smsQueryPassword")String smsQueryPassword,@Field("serverSettingIndex")String serverSettingIndex);

    //查询厅(根据账房那边排序)
    @GET("httpUserMessage/userMessage-queryAllRoomList.action")
    @ResponseFormat("json")
    Observable<AllRoomListBean> queryAllRoomList();

    //查询子户口
    @FormUrlEncoded
    @POST("appManage/appManage-queryClientReserved02.action")
    @ResponseFormat("xml")
    Observable<AccountList> queryClientReserved02(@Field("clientindex") int clientindex,
                                                  @Field("roomyear") String roomyear,
                                                  @Field("roommonth") String roommonth, @Field("recognitionValue") String recognitionValue, @Field("depositType") String depositType,@Field("currencynameCN")String currencynameCN);
//    //查询子户口 AB码
//    @FormUrlEncoded
//    @POST("appManage/appManage-queryClientReserved02.action")
//    @ResponseFormat("xml")
//    Observable<AccountList> queryClientReserved03(@Field("clientindex") int clientindex, @Field("roomid") int roomid,
//                                                  @Field("roomyear") String roomyear,
//                                                  @Field("roommonth") String roommonth, @Field("recognitionValue") String recognitionValue, @Field("depositType") String depositType, @Field("chiptype") int chiptype);

    //查询最大日期
    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryMaxChangemonth.action")
    @ResponseFormat("json")
    Observable<MaxChangemonthBean> queryMaxChangemonth(@Field("roomid") int roomid);

    //转码明细第一层
    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryClientChipConvertStatisMessage.action")
    @ResponseFormat("xml")
    Observable<ZhuanMaList1> queryZhuanma01(@Field("roommonth") String roommonth, @Field("roomyear") String roomyear, @Field("start") int start,
                                            @Field("limit") int limit, @Field("clientindex") int clientindex, @Field("clientAppmsgnum") String clientAppmsgnum,@Field("currencynameCN")String currencynameCN );

    //转码明细第二层
    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryClientChipConvertMessage.action")
    @ResponseFormat("xml")
    Observable<ZhuanMaList2> queryZhuanma02(@Field("roommonth") String roommonth, @Field("roomyear") String roomyear, @Field("start") int start,
                                            @Field("limit") int limit, @Field("clientindex") int clientindex, @Field("clientAppmsgnum") String clientAppmsgnum, @Field("roomid") int roomid,@Field("currencynameCN")String currencynameCN);

    //消費明细第一层
    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryClientConsumeStatisMessage.action")
    @ResponseFormat("xml")
    Observable<XiaoFei01Bean> queryXiaoFei01(@Field("roommonth") String roommonth, @Field("roomyear") String roomyear, @Field("start") int start,
                                             @Field("limit") int limit, @Field("clientindex") int clientindex, @Field("clientAppmsgnum") String clientAppmsgnum,@Field("currencynameCN")String currencynameCN);

    //消費明细第二层
    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryClientConsumeMessage.action")
    @ResponseFormat("xml")
    Observable<XiaoFei02Bean> queryXiaoFei02(@Field("roommonth") String roommonth, @Field("roomyear") String roomyear, @Field("start") int start,
                                             @Field("limit") int limit, @Field("clientindex") int clientindex, @Field("clientAppmsgnum") String clientAppmsgnum, @Field("roomid") int roomid,@Field("currencynameCN")String currencynameCN);

    //存单明细
    @FormUrlEncoded
    @POST("appManage/appManage-queryClientDepositReceipt.action")
    @ResponseFormat("json")
    Observable<CunDanBean> cundan(@Field("clientindex") int clientindex,@Field("currencynameCN")String currencynameCN);

    //贷赎明细
    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryClientTRLoanNum.action")
    @ResponseFormat("json")
    Observable<DaiShuBean> daishu(@Field("clientindex") int clientindex,@Field("currencynameCN")String currencynameCN);

    //账户修改密码
    @FormUrlEncoded
    @POST("httpUserMessage/SmsClient-modifySmsQueryPassword.action")
    @ResponseFormat("json")
    Observable<String> userchangepwd(@Field("clientindex") int clientindex, @Field("oldPassword") String oldPassword,
                                     @Field("newPassword") String newPassword);

    //存卡明细（第一层）
    @FormUrlEncoded
    @ResponseFormat("xml")
    @POST("httpUserMessage/userMessage-queryClientDepositcardStatisMessage.action")
    Observable<CunKaList1> cunka01(@Field("clientindex") int clientindex, @Field("start") int start,
                                   @Field("limit") int limit, @Field("clientAppmsgnum") String clientAppmsgnum,@Field("currencynameCN")String currencynameCN);

    // 存卡明细（第二层）
    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryClientDepositcardMessage.action")
    @ResponseFormat("xml")
    Observable<CunKaList2> cunka02(@Field("clientindex") int clientindex, @Field("start") int start, @Field("limit") int limit, @Field("roomid") int roomid,@Field("clientAppmsgnum") String clientAppmsgnum,@Field("currencynameCN")String currencynameCN);

    //贷款明细（第一层）
    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryClientLoanStatisMessage.action")
    @ResponseFormat("xml")
    Observable<DaiKuanBean01> daikuan1(@Field("clientindex") int clientindex, @Field("start") int start, @Field("limit") int limit,
                                       @Field("clientAppmsgnum") String clientAppmsgnum,@Field("currencynameCN")String currencynameCN);

    //贷款明细（第二层）
    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryClientLoanMessage.action")
    @ResponseFormat("xml")
    Observable<DaiKuanBean02> daikuan2(@Field("clientindex") int clientindex, @Field("start") int start, @Field("limit") int limit,
                                       @Field("roomid") int roomid, @Field("clientAppmsgnum") String clientAppmsgnum,@Field("currencynameCN")String currencynameCN);

    //场面明细
    @FormUrlEncoded
    @POST("appManage/appManage-queryClientWinnumMessage.action")
    @ResponseFormat("json")
    Observable<ChangmianBean> queryClientWinnumMessage(@Field("clientindex") int clientindex, @Field("roommonth") String roommonth, @Field("roomyear") String roomyear,
                                                       @Field("currencynameCN") String currencynameCN);

    //下线贷款（第一层）
    @FormUrlEncoded
    @POST("appManage/appManage-queryClientOfflineLoan.action")
    @ResponseFormat("json")
    Observable<XiaDaiKuan01Bean> xiadaikuan01(@Field("clientindex") int clientindex, @Field("currencynameCN") String currencynameCN);


    //户口密码输入时查询密码正确
    @FormUrlEncoded
    @POST("httpUserMessage/SmsClient-querySmsQueryPassword.action")
    @ResponseFormat("json")
    Observable<String> conFirmPwd(@Field("smsQueryPassword") String smsQueryPassword, @Field("clientid") String clientid);


    //津贴
    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryClientWageMessage.action")
    @ResponseFormat("xml")
    Observable<JinTieBean> getJintie(@Field("clientindex") int clientindex, @Field("clientid") String clientid, @Field("roomid") int roomid, @Field("clientAppmsgnum") String clientAppmsgnum);


    //場面明細 pop
    @FormUrlEncoded
    @POST("appManage/appManage-queryClientWinnumMoneyMessage.action")
    @ResponseFormat("json")
    Observable<ChangMianPopBean> changmianpop(@Field("winnumindex") int winnumindex);

    //异地登录
    @FormUrlEncoded
    @POST("httpUserMessage/SmsClient-queryUserIdRemoteLogin.action")
    Call<DistanceloginBean> distancelogin(@Field("userId") String userId, @Field("deviceUID") String deviceUID, @Field("token") String token);

    //佣金明细
    @FormUrlEncoded
    @POST("appWage/appWage-queryAppWageReport.action")
    @ResponseFormat("json")
    Observable<CommissionBean> getCommission(@Field("roomyear") String roomyear, @Field("clientindex") int clientindex, @Field("clientid") String clientid, @Field("roommonth") String roommonth);

    //特码明细
    @FormUrlEncoded
    @POST("appAllowance/appAllowance-queryAppAllowanceReport.action")
    @ResponseFormat("json")
    Observable<TemaBean> getTema(@Field("roomyear") String roomyear, @Field("clientindex") int clientindex, @Field("clientid") String clientid, @Field("roommonth") String roommonth);


    @GET("jacob/appQuery/allowance_pdf/{fileName}")  //{fileName}是动态码
    @Streaming//GET下载文件必须结合@Streaming使用
    Observable<ResponseBody> downLoadImg(@Path("fileName") String fileName);

    //删除
    @FormUrlEncoded
    @POST("appDeletePdfFile/appDeletePdfFile-deletePdfFile.action")
    @ResponseFormat("json")
    Observable<Object> delete(@Field("path") String path);

    //津贴表
    @FormUrlEncoded
    @POST("appClientAllowance/appClientAllowance-queryAppClientAllowanceReport.action")
    @ResponseFormat("json")
    Observable<JTBBean> getjtb(@Field("roomyear") String roomyear, @Field("clientindex") int clientindex, @Field("clientid") String clientid, @Field("roommonth") String roommonth);

    //查询信息列表
    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryMessage.action")
    @ResponseFormat("json")
    Observable<MsgListBean> getmsglist(@Field("sendId")String sendId,@Field("loginPort")String loginPort,@Field("loginUserId")String loginUserId);

    //幣種列表
    @FormUrlEncoded
    @POST("appManage/appManage-queryClientCurrencyCountList.action")
    @ResponseFormat("json")
    Observable<CurrencyBean> getcurrency(@Field("clientindex")int clientindex, @Field("recognitionValue")int recognitionValue);

    //查询币种列表
//    @FormUrlEncoded
    @POST("httpUserMessage/userMessage-queryAllCurrencyList.action")
    @ResponseFormat("json")
    Observable<CurrencyListBean> queryCurrencyList();
}

